var IM = IM || {};

// 小米推送
var MI_KEY = '', MI_ID = '';
// 华为推送
var IS_HUAWEI = false;


// im 日志输出
function RONGLOG(msg) {
    msg = '用户端融云输出：' + (msg || '');
    msg += '==timestap==' + new Date().getTime();
    console.warn(msg);
}

function RONGERROR(msg) {
    msg = '用户端融云错误日志：' + (msg || '');
    msg += '==timestap==' + new Date().getTime();
    console.error(msg);
}

//相机相册权限
function fnHasPermission(callback, type) {
    var list = ['camera', 'photos', 'microphone'];
    if(type == 1) {
        list = ['camera'];
    }else if(type == 2) {
        list = ['photos'];
    }
    var resultList = api.hasPermission({
        list: list
    });
    var result = [];
    for(var i = 0; i < resultList.length; i ++) {
        if(!resultList[i]['granted']) {
            result.push(resultList[i]['name']);
        }
    }
    if(result.length > 0) {
        api.requestPermission({
            list: result
        },function(ret) {
            if(ret && ret.list) {
                var cancle = []
                for(var i = 0; i < ret.list.length; i ++) {
                    if(!ret.list[i]['granted']) {
                        cancle.push(ret.list[i]['name']);
                    }
                }
                if(cancle.length >0) {
                    fnToast('您没有允许相关权限，请允许后继续');
                }
            }
        })
    }else {
        callback && callback();
    }
}

(function() {
    // 初始化 apiready 后调用
    // token 用户连接IM服务器，从服务端获取的用户身份令牌
    // statusChange IM链接状态改变的回调
    // initCallback 初始化成功后的回调
    IM.Init = function(token, statusChange, initCallback) {
        var rong = api.require('rongCloud2');
        rong.init(function(ret, err) {
            if (ret.status == 'error' || (err && err.code == '-10002')) {
                RONGERROR('初始化失败，参数配置错误，请检查config.xml')
                IM.rong = false;
            }else {
                RONGLOG('初始化成功');
                initSuccess();
                initCallback && initCallback();
            }
        });
        function initSuccess() {
            IM.rong = rong;
            IM.Call.rong = rong;
            // 连接状态改变监听
            IM.rong.setConnectionStatusListener(function(ret) {
                // 取值范围见im-readme.md  line:25
                var status = ret.result.connectionStatus;
                RONGLOG('连接状态改变=='+status);
                statusChange && statusChange(status);
            });
            // 推送消息标题，展示发送方昵称
            // 推送提示显示昵称,设置昵称的方式为：在发送消息接口的extra字段中填写昵称信息，
            // 格式为extra:{userInfo:{nickName:"用户昵称"}}
            IM.rong.configurationParameter({
                alertTitle: '您收到了一条新消息',
                showNickname: true
            });
            // 设置接收消息的监听器
            IM.rong.setOnReceiveMessageListener(function(ret, err) {
                // 收到消息
                RONGLOG('接收消息：' + JSON.stringify(ret) + '>>>>>' + JSON.stringify(err));
                try {
                    var msg = foramteNotificationMsg(ret.result.message);
                    api.sendEvent({
                        name: 'imRecieveMsg',
                        extra: {
                            msg: msg
                        }
                    })
                }catch(e) {
                    RONGERROR('接收消息解析错误>>>>'+e);
                }
                
            });
            // 当前连接状态，未连接则重新连接
            IM.rong.getConnectionStatus(function(ret) {
                var isConnnect = true;
                if(ret.status == 'success' && (ret.result.connectionStatus == 'CONNECTED' || ret.result.connectionStatus == 'CONNECTING')) {
                    isConnnect = false;
                }
                if(isConnnect) {
                    IM.rong.connect(
                        { token: token },
                        function(ret, err) {
                            if (ret.status == 'success') {
                                IM.userId = ret.result.userId;
                                RONGLOG('连接成功userId=='+IM.userId);
                            }else {
                                RONGERROR('连接失败error=='+JSON.stringify(err));
                            }
                        }
                    );
                }else {
                    RONGLOG('连接状态>>>>' + ret.result.connectionStatus);
                }
            });
            // 断开连接且不接受消息推送
            IM.disconnect = function() {
                IM.rong.disconnect({
                    isReceivePush: false
                }, function(ret) {
                    RONGERROR('断开连接>>>>>'+ret.status);
                });
            };
        };
    };
    IM.setSendId = function(id) {
        this.senderId = id;
    };
    IM.setTargetId = function(id, conversationId, targeter) {
        fnHasPermission();
        this.targetId = id;
        this.conversationId = conversationId;
        this.targeter = targeter;
    };
    window.IM = IM;
}());

// 会话，暂时无用
(function() {
    IM.Conversation = function() {

    };
    IM.Conversation.prototype = {
        constructor: IM.Conversation,
    }
}());
// msg 消息相关
(function() {
    IM._Msg = function() {
        // 发送类型
        this.type = -1;
        // 发送的内容，文本或者多媒体文件的url
        this.msg = null;
        // 音频时长
        this.duration = 0;
        this._type = {
            '1': '1',
            '2': '3',
            '3': '2',
            '4': '2',
            '5': '4',
            '6': '5'
        };
        this.errMsg = {
            '3001': '发送未开始提示 并记录消息',
            '3002': '已经提示未开始3次',
            '3003': '发送咨询已结束提示 并记录消息',
            '3004': '已经提示已结束3次'
        }
    };
    IM._Msg.prototype = {
        constructor: IM.Msg,

        // 上传多媒体文件
        // sender 要上传文件
        // callback 上传完的回调
        uploadMedia: function(sender) {
            api.showProgress({
                title: '图片上传中',
                text: ''
            });
            var self = this;
            var callback = function(url) {
                api.hideProgress();
                self.msg = url;
                self.sendMsgToRong();
            };
            fnUploadObsFile(sender, callback);
        },

        /**
         * [sendMsg 发送消息]
         * @param  type    [类型, 1 文本 2 语音 3 图片 4 拍照 5 音频 6 视频]
         * 类型为2，3，4时，会自动打开相关的页面，进行录音照片选择和拍照
         * @param  msg     [类型为1(文本)时的消息内容]
         */
        sendMsg: function(type, msg, duration) {
            this.type = type;
            this.duration = duration || 0;
            var self = this;
            if(type == 1) {
                this.msg = msg;
                this.sendMsgToRong();
            }else if(type == 2) {
                // 录音
                this.uploadMedia(msg);
            }else if(type == 3) {
                // 选择照片
                var _callback = function() {
                    var callback = function(res) {
                        if(res.eventType == 'confirm') {
                            var path = res.list[0].path;
                            if(api.systemType == 'ios') {
                                var transCallback = function(list) {
                                    self.uploadMedia(list[0].path);
                                };
                                fnQiniuTrashPath(res.list, transCallback);
                            }else {
                                self.uploadMedia(path);
                            }
                        }
                    };
                    uploadPicture(1, callback);
                };
                fnHasPermission(_callback, '2');
            }else if(type == 4) {
                // 拍照
                var _callback = function() {
                    api.getPicture({
                        sourceType: 'camera',
                        encodingType: 'png',
                        mediaValue: 'pic',
                        destinationType: 'url',
                        allowEdit: true,
                        quality: 100,
                        saveToPhotoAlbum: false
                    }, function(ret, err) {
                        if (ret && ret.data.length > 0) {
                            self.uploadMedia(ret.data);
                        }
                    });
                }
                fnHasPermission(_callback, '1');
            }else {
                this.msg = '接通通话';
                this.sendMsgToRong();
            }
        },

        sendMsgToRong: function() {
            // var params = {
            //     type: this.type,
            //     msg: this.msg,
            //     duration: this.duration
            // };
            var self = this;
            var params = {
                senderId: IM.senderId,
                targetId: IM.targetId,
                content: self.msg,
                contentType: self._type[self.type],
                conversationId: IM.conversationId,
                duration: self.duration,
                channelId: IM.Call.callId
            };
            var callback = function(data) {
                var sendMsg = '发送成功';
                if(data.errorStatus) {
                    sendMsg = self.errMsg[data.errorStatus];
                }
                RONGLOG(sendMsg);
                var msg = params;
                msg.isRight = true;
                msg.nickname = USER.Get('nickName', true);
                msg.avatar = USER.Get('photo', true);
                msg.avatar = msg.avatar && msg.avatar.length > 0 ? msg.avatar : '../../image/head.png';
                msg.msgType = msg.contentType;
                msg.showTime = true;
                var time1 = new Date().getTime();
                if (lastShowTime && time1 - lastShowTime < 60 * 1000 * 5) {
                    msg.showTime = false;
                }else {
                    lastShowTime = time1;
                }
                msg.imTime = liveDate(time1);
                msg.sendDate = new Date().getTime()+'';
                if(msg.msgType == 1) {
                    msg.content = transEmo(msg.content);
                }
                api.sendEvent({
                    name: 'msgSendSuccess',
                    extra: {
                        msg: msg
                    }
                });
            };
            var error = function(res) {
                RONGERROR('发送失败');
            };
            POST('apiTbAppUser/sendMessage', params, callback, error);
        }
    };
    IM.Msg = new IM._Msg();
}());
// call 音视频通话
(function() {
    IM._Call = function() {
        // 通话ID
        this.callId = '';
        // 是否静音
        this.mute = false;
        // 是否扩音器
        this.bigVoice = false;
    };
    IM._Call.prototype = {
        constructor: IM.Call,

        init: function() {
            // 安卓获取通知权限
            if(api.systemType === 'android') {
                IM.rong.addCallReceiveListener({
                    target: 'permissionRequest'
                },function(ret){
                    // 暂无回调处理
                    RONGLOG('安卓获取通知权限>>>>>>>'+JSON.stringify(ret))
                })
            }
        },
        // 添加音视频来电事件监听
        // callback 音频类型  通话申请发起人
        addListener: function(callback) {
            var self = this;
            self.rong.addCallReceiveListener({
                target: 'didReceiveCall'
            },function(ret){
                // 目前项目只做单聊群聊和客服
                var session = ret.callSession;
                RONGLOG('收到'+session.mediaType+'类型的通话申请，发起人'+session.callerUserId);
                self.callId = session.callId;
                var type = session.mediaType == 'audio' ? 1 : 2;
                callback && callback(session.mediaType, session);
            });
            self.rong.setSpeakerEnabled({
                speakerEnabled: false
            }, function() {
                RONGLOG('关闭扬声器');
            });
            // 音视频通话事件的监听
            // 暂只支持这五个事件
            var eventList = [
                // 通话已接通    通话已结束         对端用户切换了媒体类型
                'didConnect', 'didDisconnect', 'remoteUserDidChangeMediaType', 
                // 对端用户开启或关闭了摄像头的状态   对端用户挂断
                'remoteUserDidDisableCamera', 'remoteUserDidLeft'
            ];
            function _addListener(temp) {
                self.rong.addCallSessionListener({
                    target: temp
                },function(ret) {
                    RONGLOG('音视频事件回调>>>>'+temp+',数据>>>>'+JSON.stringify(ret));
                    if(temp == 'didConnect') {
                        // 接听后打开视频view
                        // self.openVideoView();
                        api.sendEvent({
                            name: 'im_live_didConnect'
                        });
                    }else if(temp == 'didDisconnect' || temp == 'remoteUserDidLeft') {
                        // 通话已结束 
                        self.rong.setSpeakerEnabled({
                            speakerEnabled: false
                        }, function() {
                            RONGLOG('关闭扬声器');
                        });
                        self.hangup();
                        self.callId = '';
                        api.closeWin({
                            name: 'im_live_'
                        });
                    }
                });
            }
            
            for(var i = 0; i < eventList.length; i ++) {
                var temp = eventList[i] + '';
                _addListener(temp);
            }
        },
        // 发起音视频通话
        // targetId 会话ID，单聊为接收方userID
        // mediaType 1 音频 2 视频
        // callback 通话事件回调
        startCall: function(mediaType, callback) {
            var targetId = IM.targetId;
            mediaType = mediaType == 1 ? 'audio' : 'video';
            RONGLOG('准备发起通话targetId：'+targetId+'；mediaType：'+mediaType);
            var params = { 
                conversationType:'PRIVATE',
                mediaType: mediaType
            };
            this.rong.isCallEnabled(params,function(ret){
                RONGLOG('音视频通话支持：' + JSON.stringify(ret));
            });
            api.requestPermission({
                list: ['camera', 'microphone']
            });
            this.rong.setSpeakerEnabled({
                speakerEnabled: false
            });
            this.bigVoice = false;
            this.rong.setMuted({
                muted: false
            });
            this.mute = false;
            var user = {
                // 用户信息
                user: {
                    custId: IM.senderId,
                    conversationId: IM.conversationId,
                    senderName: USER.Get('nickName', true),
                    senderPhoto: USER.Get('photo', true)
                }
            };
            var self = this;
            // 发起通话
            self.rong.startCall({
                targetId: targetId,
                conversationType: 'private',
                mediaType: mediaType,
                userIdList: [targetId],
                extra: JSON.stringify(user)
            },function(ret, err){
                RONGLOG('发起通话结果>>>>>>' + JSON.stringify(ret) +'>>>>'+ JSON.stringify(err));
                var callSession = ret.callSession;
                self.callId = callSession.callId;
            });
        },
        // 打开视频view
        openVideoView: function() {
            RONGLOG('打开视频通话view');
            this.rong.setVideoView({
                x: 0, y: 20, w: 320, h: 400,
                renderModel: 'adaptive', 
                userId: IM.senderId
            });
        },
        // 接听音视频
        // type 1 音频 2 视频
        accept: function(mediaType) {
            // mediaType = mediaType == 1 ? 'audio' : 'video';
            this.rong.setSpeakerEnabled({
                speakerEnabled: false
            });
            this.bigVoice = false;
            this.rong.setMuted({
                muted: false
            });
            this.mute = false;
            RONGLOG('接听：'+mediaType);
            this.rong.accept({
                mediaType: mediaType,
                callId: this.callId
            });
            IM.Msg.sendMsg(type == 1 ? '5' : '6');
        },
        // 挂断
        hangup: function() {
            RONGLOG('挂断音视频');
            this.rong.hangup();
            this.rong.removeVideoView({
                userId: IM.senderId
            });
            this.callId = '';
        },
        // 静音切换
        muteToggle: function() {
            this.mute = !this.mute;
            this.rong.setMuted({
                muted: this.mute
            });
            RONGLOG('设置静音>>'+this.mute);
        },
        // 扩音器切换
        bigVoiceTooggle: function() {
            this.bigVoice = !this.bigVoice;
            this.rong.setSpeakerEnabled({
                speakerEnabled: this.bigVoice
            });
            RONGLOG('设置扬声器>>>'+this.bigVoice);
        },
        // 切换摄像头
        switchCameraMode: function() {
            this.rong.switchCameraMode();
            RONGLOG('切换摄像头');
        }
    };
    IM.Call = new IM._Call();
}())

// 图片预览
var photoBrowser;
function openBigImg(img) {
    photoBrowser = api.require('photoBrowser');
    photoBrowser.open({
        images: [img],
        activeIndex: 0,
        bgColor: '#000',
        placeholderImg: 'widget://image/loading_more.gif'
    }, function(ret, err) {
        if(ret) {
            var eventType = ret.eventType;
            if(eventType == 'click') {
                closeBigImg();
            }
        }
    });
    api.addEventListener({
            name: 'keyback'
        },
        function(ret, err) {
            closeBigImg();
        }
    );
}

function closeBigImg() {
    photoBrowser = api.require('photoBrowser');
    photoBrowser.close();
    api.removeEventListener({
        name: 'keyback'
    });
}

var lastShowTime = null;
var senderId = null;
// 格式化消息记录
// 一条或多条
function formateImListdata(sender) {
    senderId = USER.Get('custId', true);
    var temp;
    if(sender && sender.length !== undefined) {
        // 列表
        temp = [];
        for(var i = 0; i < sender.length; i ++) {
            temp.push(formateOneMsg(i, sender));
        }
        return temp;
    }else if(sender) {
        // 一条数据,接受消息时用
        temp = foramteNotificationMsg(sender);
        return temp;
    }
}

// 处理收到的推送消息
function foramteNotificationMsg(sender) {
    var result = {};
    var showTime = true;
    var time1 = sender.receivedTime;
    var content = sender.content.text;
    var extra = JSON.parse(sender.content.extra);
    if (typeof time1 == "string") {
        time1 = new Date(time1.replace(/-/g, "/")).getTime();
    }
    if (lastShowTime && time1 - lastShowTime < 60 * 1000 * 5) {
        showTime = false;
    }else {
        lastShowTime = time1;
    }

    result.showTime = showTime;
    result.imTime = liveDate(time1);
    result.isRight = false;
    result.isRead = false;
    result.content = content;
    result.msgType = extra.contentType;
    result.duration = extra.duration;
    result.conversationId = extra.conversationId;
    result.sendDate = new Date().getTime()+'';
    if(result.msgType == 1) {
        result.content = transEmo(result.content);
    }

    var targeter = extra.sender;
    result.nickname = targeter.userName.length > 0 ? targeter.userName : '用户';
    result.avatar = targeter.userPortrait.length > 0 ? targeter.userPortrait : '../../image/head.png';
    // 系统消息
    if(extra.businessType == 2) {
        result.isRight = false;
        result.avatar = '../../image/head.png';
        result.nickname = '系统消息';
    }
    return result;
}
// 历史记录
function formateOneMsg(index, sender) {
    var showTime = true;
    var item = sender[index];
    var premsg = sender[index - 1]; // 上一条
    var time1 = item.sendDate; // 时间戳
    var isRight = false;
    if (typeof time1 == "string") {
        time1 = new Date(time1.replace(/-/g, "/")).getTime();
    }
    if (premsg && lastShowTime && time1 - lastShowTime < 60 * 1000 * 5) {
        showTime = false;
    }else {
        lastShowTime = time1;
    }
    if(item.senderId == senderId) {
        isRight = true;
    }
    item.showTime = showTime;
    item.isRight = isRight;
    item.isPlay = false;
    item.imTime = liveDate(time1);
    item.msgType = item.contentType;
    item.duration = item.duration;
    item.nickname = item.senderName;
    item.avatar = item.senderPhoto;
    item.isRead = item.readStatus == 1 ? true : false;
    item.conversitionId = IM.conversationId;
    if(item.msgType == 1) {
        item.content = transEmo(item.content);
    }
    // 系统消息
    if(item.businessType == 2) {
        item.isRight = false;
        item.avatar = '../../image/head.png';
        item.nickname = '系统消息';
    }
    return item;
}

function liveDate(str) {
    if(!str){
        return '';
    }
    var ns = typeof str == "string" ? str.replace(/-/g, "/") : str;
    var sendDate = new Date(ns);
    var now = new Date();

    var month = sendDate.getMonth() + 1 < 10 ? '0' + (sendDate.getMonth() + 1) : sendDate.getMonth() + 1;
    var currentDate = sendDate.getDate() < 10 ? '0' + sendDate.getDate() : sendDate.getDate();
    var hh = sendDate.getHours() < 10 ? '0' + sendDate.getHours() : sendDate.getHours();
    var mm = sendDate.getMinutes() < 10 ? '0' + sendDate.getMinutes() : sendDate.getMinutes();

    if (now.getDate() === sendDate.getDate() && now.getMonth() === sendDate.getMonth()) {
        return "今天 " + hh + ':' + mm;
    }else if (now.getMonth() === sendDate.getMonth()) {
        if (now.getDate() - sendDate.getDate() == 1) {
            return "昨天 " + hh + ':' + mm;
        }else if (now.getDate() - sendDate.getDate() < 8) {
            return now.getDate() - sendDate.getDate() + "天前 " + hh + ':' + mm;
        }else if (now.getFullYear() === sendDate.getFullYear()) {
            return month + '-' + currentDate + ' ' + hh + ':' + mm;
        }else {
            return sendDate.getFullYear() + '-' + month + '-' + currentDate + ' ' + hh + ':' + mm;
        }
    }else {
        return sendDate.getFullYear() + '-' + month + '-' + currentDate + ' ' + hh + ':' + mm;
    }
}

//文字表情转换
function transEmo(emoMsg){
    var emoPath, transMsg;
    var reg = /\[(.*?)\]/gm;
    transMsg = emoMsg.replace(reg, function(match) {
        for (var i = 0, len = emoData.length; i < len; i++) {
                if (emoData[i].text === match) {
                        emoPath = '../../image/emotion/' + emoData[i].name + '.png';
                        return '<img style="width:20px;height:20px;margin:0;" src="' + emoPath + '" />'
                }
        }
        return match;
    });
    return transMsg;
}

//表情配置信息
var emoData = [
    {"name": "Expression_1","text": "[微笑]"},
    {"name": "Expression_2","text": "[撇嘴]"},
    {"name": "Expression_3","text": "[色]"},
    {"name": "Expression_4","text": "[发呆]"},
    {"name": "Expression_5","text": "[得意]"},
    {"name": "Expression_6","text": "[流泪]"},
    {"name": "Expression_7","text": "[害羞]"},
    {"name": "Expression_8","text": "[闭嘴]"},
    {"name": "Expression_9","text": "[睡]"},
    {"name": "Expression_10","text": "[大哭]"},
    {"name": "Expression_11","text": "[尴尬]"},
    {"name": "Expression_12","text": "[发怒]"},
    {"name": "Expression_13","text": "[调皮]"},
    {"name": "Expression_14","text": "[呲牙]"},
    {"name": "Expression_15","text": "[惊讶]"},
    {"name": "Expression_16","text": "[难过]"},
    {"name": "Expression_17","text": "[酷]"},
    {"name": "Expression_18","text": "[冷汗]"},
    {"name": "Expression_19","text": "[抓狂]"},
    {"name": "Expression_20","text": "[吐]"},
    {"name": "Expression_21","text": "[偷笑]"},
    {"name": "Expression_22","text": "[愉快]"},
    {"name": "Expression_23","text": "[白眼]"},
    {"name": "Expression_24","text": "[傲慢]"},
    {"name": "Expression_25","text": "[饥饿]"},
    {"name": "Expression_26","text": "[困]"},
    {"name": "Expression_27","text": "[恐惧]"},
    {"name": "Expression_28","text": "[流汗]"},
    {"name": "Expression_29","text": "[憨笑]"},
    {"name": "Expression_30","text": "[悠闲]"},
    {"name": "Expression_31","text": "[奋斗]"},
    {"name": "Expression_32","text": "[咒骂]"},
    {"name": "Expression_33","text": "[疑问]"},
    {"name": "Expression_34","text": "[嘘]"},
    {"name": "Expression_35","text": "[晕]"},
    {"name": "Expression_36","text": "[疯了]"},
    {"name": "Expression_37","text": "[衰]"},
    {"name": "Expression_38","text": "[骷髅]"},
    {"name": "Expression_39","text": "[敲打]"},
    {"name": "Expression_40","text": "[再见]"},
    {"name": "Expression_41","text": "[擦汗]"},
    {"name": "Expression_42","text": "[抠鼻]"},
    {"name": "Expression_43","text": "[鼓掌]"},
    {"name": "Expression_44","text": "[糗大了]"},
    {"name": "Expression_45","text": "[坏笑]"},
    {"name": "Expression_46","text": "[左哼哼]"},
    {"name": "Expression_47","text": "[右哼哼]"},
    {"name": "Expression_48","text": "[哈欠]"},
    {"name": "Expression_49","text": "[鄙视]"},
    {"name": "Expression_50","text": "[委屈]"},
    {"name": "Expression_51","text": "[快哭了]"},
    {"name": "Expression_52","text": "[阴险]"},
    {"name": "Expression_53","text": "[亲亲]"},
    {"name": "Expression_54","text": "[吓]"},
    {"name": "Expression_55","text": "[可怜]"},
    {"name": "Expression_56","text": "[菜刀]"},
    {"name": "Expression_57","text": "[西瓜]"},
    {"name": "Expression_58","text": "[啤酒]"},
    {"name": "Expression_59","text": "[篮球]"},
    {"name": "Expression_60","text": "[乒乓]"},
    {"name": "Expression_61","text": "[咖啡]"},
    {"name": "Expression_62","text": "[饭]"},
    {"name": "Expression_63","text": "[猪头]"},
    {"name": "Expression_64","text": "[玫瑰]"},
    {"name": "Expression_65","text": "[凋谢]"},
    {"name": "Expression_66","text": "[嘴唇]"},
    {"name": "Expression_67","text": "[爱心]"},
    {"name": "Expression_68","text": "[心碎]"},
    {"name": "Expression_69","text": "[蛋糕]"},
    {"name": "Expression_70","text": "[闪电]"},
    {"name": "Expression_71","text": "[炸弹]"},
    {"name": "Expression_72","text": "[刀]"},
    {"name": "Expression_73","text": "[足球]"},
    {"name": "Expression_74","text": "[瓢虫]"},
    {"name": "Expression_75","text": "[便便]"},
    {"name": "Expression_76","text": "[月亮]"},
    {"name": "Expression_77","text": "[太阳]"},
    {"name": "Expression_78","text": "[礼物]"},
    {"name": "Expression_79","text": "[拥抱]"},
    {"name": "Expression_80","text": "[强]"},
    {"name": "Expression_81","text": "[弱]"},
    {"name": "Expression_82","text": "[握手]"},
    {"name": "Expression_83","text": "[胜利]"},
    {"name": "Expression_84","text": "[抱拳]"},
    {"name": "Expression_85","text": "[勾引]"},
    {"name": "Expression_86","text": "[拳头]"},
    {"name": "Expression_87","text": "[差劲]"},
    {"name": "Expression_88","text": "[爱你]"},
    {"name": "Expression_89","text": "[NO]"},
    {"name": "Expression_90","text": "[OK]"},
    {"name": "Expression_91","text": "[爱情]"},
    {"name": "Expression_92","text": "[飞吻]"},
    {"name": "Expression_93","text": "[跳跳]"},
    {"name": "Expression_94","text": "[发抖]"},
    {"name": "Expression_95","text": "[怄火]"},
    {"name": "Expression_96","text": "[转圈]"},
    {"name": "Expression_97","text": "[磕头]"},
    {"name": "Expression_98","text": "[回头]"},
    {"name": "Expression_99","text": "[跳绳]"},
    {"name": "Expression_100","text": "[投降]"},
    {"name": "Expression_101","text": "[激动]"},
    {"name": "Expression_102","text": "[街舞]"},
    {"name": "Expression_103","text": "[献吻]"},
    {"name": "Expression_104","text": "[左太极]"},
    {"name": "Expression_105","text": "[右太极]"}
];
